home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
adlibn
/
formcust.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1998-12-24
|
2KB
|
72 lines
// FormCust.cpp : implementation file
//
#include "stdafx.h"
#include "DBTest.h"
#include "FormCust.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFormCust
IMPLEMENT_DYNCREATE(CFormCust, CDBForm)
CFormCust::CFormCust()
: CDBForm(CFormCust::IDD)
{
//{{AFX_DATA_INIT(CFormCust)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CFormCust::~CFormCust()
{
}
void CFormCust::DoDataExchange(CDataExchange* pDX)
{
CDBForm::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFormCust)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFormCust, CDBForm)
//{{AFX_MSG_MAP(CFormCust)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFormCust diagnostics
#ifdef _DEBUG
void CFormCust::AssertValid() const
{
CDBForm::AssertValid();
}
void CFormCust::Dump(CDumpContext& dc) const
{
CDBForm::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CFormCust message handlers
void CFormCust::OnInitialUpdate()
{
OpenCursor( "SELECT * FROM [Customers]");
AddEditCtrl( IDC_EDIT_ID, "IdCust", FLAG_EDIT_R_ONLY);
AddEditCtrl( IDC_EDIT_NAME, "Name");
CDBForm::OnInitialUpdate();
}